/* eslint-disable */
/* tslint:disable */
/*
 * ---------------------------------------------------------------
 * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API        ##
 * ##                                                           ##
 * ## AUTHOR: acacode                                           ##
 * ## SOURCE: https://github.com/acacode/swagger-typescript-api ##
 * ---------------------------------------------------------------
 */

export interface ResultData {
  /** @default 200 */
  code: number;
  /** @default "ok" */
  msg: string;
}

export interface MUserEntity {
  id?: string;
  password?: string;
  /** 手机号 */
  phoneNum: string;
  /** 昵称 */
  nickName: string;
  /** 真实名称 */
  realName: string;
  /** 邮箱 */
  email: string;
  /** 所属状态: 1-有效，0-禁用 */
  status: 0 | 1;
  /** 用户类型: xyc */
  type: string;
  /** 头像url */
  avatar: string;
  /**
   * 更新时间
   * @format date-time
   */
  updateDate: string;
}

export interface CreateTokenDto {
  /** token */
  accessToken: string;
  /** 刷新token */
  refreshToken: string;
}

export interface CreateTokenResponseDto {
  id?: string;
  password?: string;
  /** 手机号 */
  phoneNum: string;
  /** 昵称 */
  nickName: string;
  /** 真实名称 */
  realName: string;
  /** 邮箱 */
  email: string;
  /** 所属状态: 1-有效，0-禁用 */
  status: 0 | 1;
  /** 用户类型: xyc */
  type: string;
  /** 头像url */
  avatar: string;
  /**
   * 更新时间
   * @format date-time
   */
  updateDate: string;
  /** token */
  accessToken: string;
  /** 刷新token */
  refreshToken: string;
}

export interface CreateUserDto {
  /** 获取openId的code */
  code: string;
  /** 获取phone的code */
  phoneNumberCode: string;
  /** 加密算法的初始向量 */
  iv?: string;
  /** 包括敏感数据在内的完整用户信息的加密数据 */
  encryptedData?: string;
}

export interface LoginUser {
  /** 账号 */
  account: string;
  /** 密码 */
  password: string;
}

export interface AlipayLoginRequest {
  /** 换取手机号密文 */
  crypted: string;
  /** authCode */
  authCode: string;
}

export interface WXGetSignRes {
  /** 必填，公众号的唯一标识 */
  appId: string;
  /** 必填，生成签名的时间戳 */
  timestamp: number;
  /** 必填，生成签名的随机串 */
  nonceStr: string;
  /** 必填，签名 */
  signature: string;
}

export interface WXGetSignReq {
  /** 当前页面url */
  url: string;
}

export interface WXGetUserInfoReq {
  /** 微信登录回调code */
  code: string;
}

export interface MLoginRequest {
  /** code */
  code: string;
}

export interface UpdateUserDto {
  /** 用户编码 */
  id: string;
  /** 所属状态: 1-有效，0-禁用 */
  status?: 0 | 1;
  /** 手机号 */
  phoneNum?: string;
  /** 邮箱 */
  email?: string;
  /** 头像 */
  avatar?: string;
  /** 角色 id 集合 */
  roleIds?: string[];
}

export interface XYCUpdateDataDto {
  /** 分享数 */
  share?: number;
  /** 售卡数 */
  buy?: number;
  /** 浏览数 */
  browse?: number;
  /** 获取服务器当前时间,13位时间戳 */
  time?: number;
}

export interface OssEntity {
  /** id */
  id: number;
  /** 上传用户id */
  userId: string;
  /** 上传用户帐号 */
  userAccount: string;
  /** 文件 url */
  url: string;
  /** 文件size */
  size: number;
  /** 文件mimetype类型 */
  type: string;
  /** 业务描述字段，可以字符串，也可以是 JSON 字符串 */
  business: string;
  /** 文件hash */
  filehash: string;
  /** 上传时间 */
  createDate: object;
}

export interface ProductMealEntity {
  /** 套餐id */
  mealId: string;
  /** 套餐名称 */
  mealName: string;
  /** 图片 */
  img: string;
  /** 商品id */
  productId: string;
  /** 组name */
  groupName: string;
  /** 组id */
  groupId: string;
  /** 组排序 */
  groupIdx: number;
  /** 排序 */
  sort: number;
  /**
   * 更新时间
   * @format date-time
   */
  updateDate: string;
}

export interface MealGroupDto {
  /** id */
  id: string;
  /** 名称 */
  name?: string;
  /** 套餐列表 */
  mealList: ProductMealEntity[];
}

export interface ProductMealDaysPriceEntity {
  /** 商品id */
  productId?: string;
  /** 商品套餐id */
  mealId?: string;
  /** 商品套餐id集合，多个用_分开 */
  mealIds?: string;
  /** 天数 */
  day: number;
  /** 单价/天 */
  price: number;
  /**
   * 更新时间
   * @format date-time
   */
  updateDate?: string;
}

export interface ProductListResponstDto {
  /** id */
  id: string;
  /** 商品编码 */
  code: string;
  /** 商品名称 */
  name: string;
  /** 简介 */
  intro: string;
  /** 图片 */
  imgs: string;
  /** 状态 */
  status: 0 | 1;
  /** 备注 */
  remark: string;
  /** 分类 */
  categoryId: string;
  /** 押金 */
  deposit: number;
  /** 商品介绍 */
  desc: string;
  /** 排序 */
  orderNum: number;
  /**
   * 更新时间
   * @format date-time
   */
  updateDate: string;
  /** 套餐组列表 */
  mealGroupList: MealGroupDto[];
  /** 天数价格list */
  daysPrice: ProductMealDaysPriceEntity[];
  /** 最低价 */
  minPrice: number;
}

export interface ProductDetailResponseDto {
  /** id */
  id: string;
  /** 商品编码 */
  code: string;
  /** 商品名称 */
  name: string;
  /** 简介 */
  intro: string;
  /** 图片 */
  imgs: string;
  /** 状态 */
  status: 0 | 1;
  /** 备注 */
  remark: string;
  /** 分类 */
  categoryId: string;
  /** 押金 */
  deposit: number;
  /** 商品介绍 */
  desc: string;
  /** 排序 */
  orderNum: number;
  /**
   * 更新时间
   * @format date-time
   */
  updateDate: string;
  /** 套餐组列表 */
  mealGroupList: MealGroupDto[];
  /** 天数价格list */
  daysPrice: ProductMealDaysPriceEntity[];
  /** 套餐 */
  meal?: ProductMealEntity[];
  /** 主图 */
  imgList: string[];
  /** 最低价 */
  minPrice: number;
  /** 最高价 */
  maxPrice: number;
}

export interface OrderEntity {
  /** id */
  id: string;
  /** 商品名称 */
  productName: string;
  /** 商品ID */
  productId: string;
  /** 套餐名称 */
  mealName: string;
  /** 套餐图片 */
  mealImg: string;
  /** 套餐ID */
  mealId: string;
  /** 单价 */
  price: number;
  /** 数量 */
  num: number;
  /** 收货人 */
  aname: string;
  /** 收货手机 */
  phone: string;
  /** 收货地址 */
  fullAddress: string;
  /** 快递费用 */
  deliveryCosts: number;
  /** 原始总价 */
  originTotalPrice: number;
  /** 用户优惠券ID */
  userCouponId: string;
  /** 优惠金额 */
  couponPrice: number;
  /** 现应支付总价（优惠券抵扣后的） */
  payTotalPrice: number;
  /** 用户ID */
  userId: string;
  /** 支付宝订单号 */
  tradeNO: string;
  /** 订单状态 1 等待买家付款 2 等待发货 3 已发货 4 待续费  6 已完成 7 已关闭  8待退款 9退款中 10 已退款 */
  orderStatus: "1" | "2" | "3" | "4" | "5" | "6" | "9";
  /** 订单状态，1-有效，0-禁用 */
  status: 0 | 1;
  /** 备注 */
  remark: string;
  /**
   * 更新时间
   * @format date-time
   */
  updateDate: string;
}

export interface XYCOrderEntity {
  /** id */
  id?: string;
  /** 售卡品牌 */
  brand?: string;
  /** 收货人 */
  name: string;
  /** 收货手机 */
  phone: string;
  /** 收货地址 */
  address: string;
  /** 售卡人 */
  userId?: string;
  /** 订单状态，1-有效，0-禁用 */
  status?: 0 | 1;
  /** 备注 */
  remark?: string;
  /**
   * 更新时间
   * @format date-time
   */
  updateDate?: string;
}

export interface CouponEntity {
  /** id */
  id: string;
  /** 是否启用， 0-否 1-是 */
  enabled: "0" | "1";
  /** 优惠券名称 */
  name: string;
  /** 备注 */
  desc: string;
  /** 限制类型（0金额、1数量/天) 最低多少才可以使用该优惠券 */
  limitType: "0" | "1";
  /** 限制的数值（金额、数量/天) */
  limit: number;
  /** 优惠类型， 0 满减 1 折扣 2 满送（如满10天送1天，满5个送1个，满100元送一个） */
  type: "0" | "1" | "2";
  /** 优惠的具体值 如折扣时0.9 则是9折 */
  discounts: number;
  /** 优惠的具体值最大值 只针对type=1折扣时有效 如8折券，最高抵扣100元 默认不限制(只针对钱) */
  maxdiscounts: number;
  /** 有效期类型 0具体时间，1天数 */
  expiryType: "0" | "1";
  /** 有效期值 如 30 天 或2024/1/1 00:00:00 */
  expiry: string;
  /**
   * 更新时间
   * @format date-time
   */
  updateDate?: string;
}

export interface UserCouponEntity {
  /** id */
  id: string;
  /** 是否已使用， 0-否 1-是 */
  used: "0" | "1";
  /** 状态，1-有效，0-禁用 */
  status: 0 | 1;
  /** userId */
  userId: string;
  /** coupon_id */
  couponId: string;
  /** 备注 */
  desc: string;
  /**
   * 更新时间
   * @format date-time
   */
  updateDate?: string;
  /** 优惠券信息 */
  info: CouponEntity;
}

export interface IndexResponseDto {
  /** banner */
  bannerList: string[];
  /** 商品 */
  productList: string[];
}

export interface ProductEntity {
  /** id */
  id: string;
  /** 商品编码 */
  code: string;
  /** 商品名称 */
  name: string;
  /** 简介 */
  intro: string;
  /** 图片 */
  imgs: string;
  /** 状态 */
  status: 0 | 1;
  /** 备注 */
  remark: string;
  /** 分类 */
  categoryId: string;
  /** 押金 */
  deposit: number;
  /** 商品介绍 */
  desc: string;
  /** 排序 */
  orderNum: number;
  /**
   * 更新时间
   * @format date-time
   */
  updateDate: string;
  /** 套餐组列表 */
  mealGroupList: MealGroupDto[];
  /** 天数价格list */
  daysPrice: ProductMealDaysPriceEntity[];
}

export interface BannerEntity {
  /** id */
  id: string;
  /** 名称 */
  name: string;
  /** 状态 */
  status: 0 | 1;
  /** 排序 */
  orderNum: number;
  /** 图片地址 */
  img: string;
  /** 跳转url */
  url: string;
  /** 备注 */
  remark: string;
  /**
   * 更新时间
   * @format date-time
   */
  updateDate: string;
}

export interface AddressEntity {
  /** id */
  id?: string;
  /** userId */
  userId?: string;
  /** 是否默认地址， 0-否 1-是 */
  isDefault?: 0 | 1;
  /** 收货人 */
  name?: string;
  /** 联系电话 */
  phone?: string;
  /** 备用电话 */
  alternatePhone?: string;
  /** 省 */
  province?: string;
  /** 市 */
  city?: string;
  /** 区 */
  region?: string;
  /** 详细地址 */
  addressDetail?: string;
  /** 楼栋门牌号 */
  addressNo?: string;
  /**
   * 更新时间
   * @format date-time
   */
  updateDate?: string;
}

export interface ProvinceEntity {
  /** 编码 */
  code?: string;
  /** 省份名 */
  name?: string;
  /**
   * 更新时间
   * @format date-time
   */
  updateDate?: string;
}

export interface CityEntity {
  /** 城市编码 */
  code?: string;
  /** 城市名 */
  name?: string;
  /** provinceCode */
  provinceCode?: string;
  /**
   * 更新时间
   * @format date-time
   */
  updateDate?: string;
}

export interface AreaEntity {
  /** 编码 */
  code?: string;
  /** 名称 */
  name?: string;
  /** cityCode */
  cityCode?: string;
  /** provinceCode */
  provinceCode?: string;
  /**
   * 更新时间
   * @format date-time
   */
  updateDate?: string;
}

export interface IntroEntity {
  /** intro_id */
  introId: string;
  /** 标题 */
  name: string;
  /** 文本 */
  text: string;
  /** 备注 */
  remark: string;
  /** 用处 1 小程序 */
  type: string;
  /**
   * 更新时间
   * @format date-time
   */
  updateDate: string;
}

export interface FindIntroListDto {
  /** 显示页数 */
  page?: number;
  /** 每页显示条数 */
  size?: number;
  /** 名称 */
  name?: string;
  /** ids */
  ids?: string[];
  /** type */
  type?: string;
}

export type QueryParamsType = Record<string | number, any>;
export type ResponseFormat = keyof Omit<Body, "body" | "bodyUsed">;

export interface FullRequestParams extends Omit<RequestInit, "body"> {
  /** set parameter to `true` for call `securityWorker` for this request */
  secure?: boolean;
  /** request path */
  path: string;
  /** content type of request body */
  type?: ContentType;
  /** query params */
  query?: QueryParamsType;
  /** format of response (i.e. response.json() -> format: "json") */
  format?: ResponseFormat;
  /** request body */
  body?: unknown;
  /** base url */
  baseUrl?: string;
  /** request cancellation token */
  cancelToken?: CancelToken;
}

export type RequestParams = Omit<FullRequestParams, "body" | "method" | "query" | "path">;

export interface ApiConfig<SecurityDataType = unknown> {
  baseUrl?: string;
  baseApiParams?: Omit<RequestParams, "baseUrl" | "cancelToken" | "signal">;
  securityWorker?: (securityData: SecurityDataType | null) => Promise<RequestParams | void> | RequestParams | void;
  customFetch?: typeof fetch;
}

export interface HttpResponse<D extends unknown, E extends unknown = unknown> extends Response {
  data: D;
  error: E;
}

type CancelToken = Symbol | string | number;

export enum ContentType {
  Json = "application/json",
  FormData = "multipart/form-data",
  UrlEncoded = "application/x-www-form-urlencoded",
  Text = "text/plain",
}

export class HttpClient<SecurityDataType = unknown> {
  public baseUrl: string = "";
  private securityData: SecurityDataType | null = null;
  private securityWorker?: ApiConfig<SecurityDataType>["securityWorker"];
  private abortControllers = new Map<CancelToken, AbortController>();
  private customFetch = (...fetchParams: Parameters<typeof fetch>) => fetch(...fetchParams);

  private baseApiParams: RequestParams = {
    credentials: "same-origin",
    headers: {},
    redirect: "follow",
    referrerPolicy: "no-referrer",
  };

  constructor(apiConfig: ApiConfig<SecurityDataType> = {}) {
    Object.assign(this, apiConfig);
  }

  public setSecurityData = (data: SecurityDataType | null) => {
    this.securityData = data;
  };

  protected encodeQueryParam(key: string, value: any) {
    const encodedKey = encodeURIComponent(key);
    return `${encodedKey}=${encodeURIComponent(typeof value === "number" ? value : `${value}`)}`;
  }

  protected addQueryParam(query: QueryParamsType, key: string) {
    return this.encodeQueryParam(key, query[key]);
  }

  protected addArrayQueryParam(query: QueryParamsType, key: string) {
    const value = query[key];
    return value.map((v: any) => this.encodeQueryParam(key, v)).join("&");
  }

  protected toQueryString(rawQuery?: QueryParamsType): string {
    const query = rawQuery || {};
    const keys = Object.keys(query).filter((key) => "undefined" !== typeof query[key]);
    return keys
      .map((key) => (Array.isArray(query[key]) ? this.addArrayQueryParam(query, key) : this.addQueryParam(query, key)))
      .join("&");
  }

  protected addQueryParams(rawQuery?: QueryParamsType): string {
    const queryString = this.toQueryString(rawQuery);
    return queryString ? `?${queryString}` : "";
  }

  private contentFormatters: Record<ContentType, (input: any) => any> = {
    [ContentType.Json]: (input: any) =>
      input !== null && (typeof input === "object" || typeof input === "string") ? JSON.stringify(input) : input,
    [ContentType.Text]: (input: any) => (input !== null && typeof input !== "string" ? JSON.stringify(input) : input),
    [ContentType.FormData]: (input: any) =>
      Object.keys(input || {}).reduce((formData, key) => {
        const property = input[key];
        formData.append(
          key,
          property instanceof Blob
            ? property
            : typeof property === "object" && property !== null
            ? JSON.stringify(property)
            : `${property}`,
        );
        return formData;
      }, new FormData()),
    [ContentType.UrlEncoded]: (input: any) => this.toQueryString(input),
  };

  protected mergeRequestParams(params1: RequestParams, params2?: RequestParams): RequestParams {
    return {
      ...this.baseApiParams,
      ...params1,
      ...(params2 || {}),
      headers: {
        ...(this.baseApiParams.headers || {}),
        ...(params1.headers || {}),
        ...((params2 && params2.headers) || {}),
      },
    };
  }

  protected createAbortSignal = (cancelToken: CancelToken): AbortSignal | undefined => {
    if (this.abortControllers.has(cancelToken)) {
      const abortController = this.abortControllers.get(cancelToken);
      if (abortController) {
        return abortController.signal;
      }
      return void 0;
    }

    const abortController = new AbortController();
    this.abortControllers.set(cancelToken, abortController);
    return abortController.signal;
  };

  public abortRequest = (cancelToken: CancelToken) => {
    const abortController = this.abortControllers.get(cancelToken);

    if (abortController) {
      abortController.abort();
      this.abortControllers.delete(cancelToken);
    }
  };

  public request = async <T = any, E = any>({
    body,
    secure,
    path,
    type,
    query,
    format,
    baseUrl,
    cancelToken,
    ...params
  }: FullRequestParams): Promise<HttpResponse<T, E>> => {
    const secureParams =
      ((typeof secure === "boolean" ? secure : this.baseApiParams.secure) &&
        this.securityWorker &&
        (await this.securityWorker(this.securityData))) ||
      {};
    const requestParams = this.mergeRequestParams(params, secureParams);
    const queryString = query && this.toQueryString(query);
    const payloadFormatter = this.contentFormatters[type || ContentType.Json];
    const responseFormat = format || requestParams.format;

    return this.customFetch(`${baseUrl || this.baseUrl || ""}${path}${queryString ? `?${queryString}` : ""}`, {
      ...requestParams,
      headers: {
        ...(requestParams.headers || {}),
        ...(type && type !== ContentType.FormData ? { "Content-Type": type } : {}),
      },
      signal: (cancelToken ? this.createAbortSignal(cancelToken) : requestParams.signal) || null,
      body: typeof body === "undefined" || body === null ? null : payloadFormatter(body),
    }).then(async (response) => {
      const r = response as HttpResponse<T, E>;
      r.data = null as unknown as T;
      r.error = null as unknown as E;

      const data = !responseFormat
        ? r
        : await response[responseFormat]()
            .then((data) => {
              if (r.ok) {
                r.data = data;
              } else {
                r.error = data;
              }
              return r;
            })
            .catch((e) => {
              r.error = e;
              return r;
            });

      if (cancelToken) {
        this.abortControllers.delete(cancelToken);
      }

      if (!response.ok) throw data;
      return data;
    });
  };
}

/**
 * @title mobile
 * @version 2.0.0
 * @contact
 *
 * mobile 接口文档
 */
export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDataType> {
  api = {
    /**
     * No description
     *
     * @tags 登录注册
     * @name BaseControllerCreate
     * @summary wx用户注册及登录
     * @request POST:/api/register
     */
    baseControllerCreate: (data: CreateUserDto, params: RequestParams = {}) =>
      this.request<
        ResultData & {
          data?: CreateTokenResponseDto;
        },
        any
      >({
        path: `/api/register`,
        method: "POST",
        body: data,
        type: ContentType.Json,
        format: "json",
        ...params,
      }),

    /**
     * No description
     *
     * @tags 登录注册
     * @name BaseControllerLogin
     * @summary 登录
     * @request POST:/api/login
     */
    baseControllerLogin: (data: LoginUser, params: RequestParams = {}) =>
      this.request<
        ResultData & {
          data?: CreateTokenDto;
        },
        any
      >({
        path: `/api/login`,
        method: "POST",
        body: data,
        type: ContentType.Json,
        format: "json",
        ...params,
      }),

    /**
     * No description
     *
     * @tags 登录注册
     * @name BaseControllerAuth
     * @summary 判断当前是否登录
     * @request POST:/api/auth
     */
    baseControllerAuth: (data: LoginUser, params: RequestParams = {}) =>
      this.request<
        ResultData & {
          data?: CreateTokenDto;
        },
        any
      >({
        path: `/api/auth`,
        method: "POST",
        body: data,
        type: ContentType.Json,
        format: "json",
        ...params,
      }),

    /**
     * No description
     *
     * @tags 登录注册
     * @name BaseControllerUpdateToken
     * @summary 刷新token
     * @request POST:/api/update/token
     * @secure
     */
    baseControllerUpdateToken: (params: RequestParams = {}) =>
      this.request<
        ResultData & {
          data?: CreateTokenDto;
        },
        any
      >({
        path: `/api/update/token`,
        method: "POST",
        secure: true,
        format: "json",
        ...params,
      }),

    /**
     * No description
     *
     * @tags 登录注册
     * @name BaseControllerGetAlipayPhone
     * @summary 获取支付宝手机号码注册并登录
     * @request POST:/api/getAlipayPhone
     */
    baseControllerGetAlipayPhone: (data: AlipayLoginRequest, params: RequestParams = {}) =>
      this.request<
        ResultData & {
          data?: CreateTokenDto;
        },
        any
      >({
        path: `/api/getAlipayPhone`,
        method: "POST",
        body: data,
        type: ContentType.Json,
        format: "json",
        ...params,
      }),

    /**
     * No description
     *
     * @tags 登录注册
     * @name BaseControllerGetWxSign
     * @summary xyc获取wxJSSDK签名相关信息
     * @request POST:/api/getWxSign
     */
    baseControllerGetWxSign: (data: WXGetSignReq, params: RequestParams = {}) =>
      this.request<
        ResultData & {
          data?: WXGetSignRes;
        },
        any
      >({
        path: `/api/getWxSign`,
        method: "POST",
        body: data,
        type: ContentType.Json,
        format: "json",
        ...params,
      }),

    /**
     * No description
     *
     * @tags 登录注册
     * @name BaseControllerGetXycUserInfo
     * @summary xyc获取wx用户信息
     * @request POST:/api/getXycUserInfo
     */
    baseControllerGetXycUserInfo: (data: WXGetUserInfoReq, params: RequestParams = {}) =>
      this.request<
        ResultData & {
          data?: WXGetSignRes;
        },
        any
      >({
        path: `/api/getXycUserInfo`,
        method: "POST",
        body: data,
        type: ContentType.Json,
        format: "json",
        ...params,
      }),

    /**
     * No description
     *
     * @tags 登录注册
     * @name BaseControllerMlogin
     * @summary 支付宝小程序扫码确认登录
     * @request POST:/api/mlogin
     */
    baseControllerMlogin: (data: MLoginRequest, params: RequestParams = {}) =>
      this.request<
        ResultData & {
          data?: CreateTokenDto;
        },
        any
      >({
        path: `/api/mlogin`,
        method: "POST",
        body: data,
        type: ContentType.Json,
        format: "json",
        ...params,
      }),

    /**
     * No description
     *
     * @tags 用户账号
     * @name UserControllerDetail
     * @summary 根据id查询用户信息
     * @request GET:/api/user/detail
     * @secure
     */
    userControllerDetail: (params: RequestParams = {}) =>
      this.request<
        ResultData & {
          data?: MUserEntity;
        },
        any
      >({
        path: `/api/user/detail`,
        method: "GET",
        secure: true,
        format: "json",
        ...params,
      }),

    /**
     * No description
     *
     * @tags 用户账号
     * @name UserControllerUpdate
     * @summary 更新用户信息
     * @request POST:/api/user
     * @secure
     */
    userControllerUpdate: (data: MUserEntity, params: RequestParams = {}) =>
      this.request<
        ResultData & {
          /** @default null */
          data?: null;
        },
        any
      >({
        path: `/api/user`,
        method: "POST",
        body: data,
        secure: true,
        type: ContentType.Json,
        format: "json",
        ...params,
      }),

    /**
     * No description
     *
     * @tags 用户账号
     * @name UserControllerAdd
     * @summary 创建用户信息
     * @request POST:/api/user/add
     * @secure
     */
    userControllerAdd: (data: MUserEntity, params: RequestParams = {}) =>
      this.request<
        ResultData & {
          /** @default null */
          data?: null;
        },
        any
      >({
        path: `/api/user/add`,
        method: "POST",
        body: data,
        secure: true,
        type: ContentType.Json,
        format: "json",
        ...params,
      }),

    /**
     * No description
     *
     * @tags 用户账号
     * @name UserControllerXycDelete
     * @summary xyc删除用户
     * @request POST:/api/user/xycDelete
     * @secure
     */
    userControllerXycDelete: (data: UpdateUserDto, params: RequestParams = {}) =>
      this.request<
        ResultData & {
          /** @default null */
          data?: null;
        },
        any
      >({
        path: `/api/user/xycDelete`,
        method: "POST",
        body: data,
        secure: true,
        type: ContentType.Json,
        format: "json",
        ...params,
      }),

    /**
     * No description
     *
     * @tags 用户账号
     * @name UserControllerGetMUserList
     * @summary xyc获取用户列表
     * @request GET:/api/user/getMUserList
     * @secure
     */
    userControllerGetMUserList: (params: RequestParams = {}) =>
      this.request<
        ResultData & {
          data?: MUserEntity[];
        },
        any
      >({
        path: `/api/user/getMUserList`,
        method: "GET",
        secure: true,
        format: "json",
        ...params,
      }),

    /**
     * No description
     *
     * @tags 用户账号
     * @name UserControllerXycDataAdd
     * @summary 客户免登录更新分享，售卡，浏览数
     * @request POST:/api/user/xycUpdateData
     * @secure
     */
    userControllerXycDataAdd: (data: XYCUpdateDataDto, params: RequestParams = {}) =>
      this.request<
        ResultData & {
          data?: XYCUpdateDataDto;
        },
        any
      >({
        path: `/api/user/xycUpdateData`,
        method: "POST",
        body: data,
        secure: true,
        type: ContentType.Json,
        format: "json",
        ...params,
      }),

    /**
     * No description
     *
     * @tags 用户账号
     * @name UserControllerXycManagerDataAdd
     * @summary 登录更新分享，售卡，浏览数
     * @request POST:/api/user/xycManagerUpdateData
     * @secure
     */
    userControllerXycManagerDataAdd: (data: XYCUpdateDataDto, params: RequestParams = {}) =>
      this.request<
        ResultData & {
          data?: XYCUpdateDataDto;
        },
        any
      >({
        path: `/api/user/xycManagerUpdateData`,
        method: "POST",
        body: data,
        secure: true,
        type: ContentType.Json,
        format: "json",
        ...params,
      }),

    /**
     * No description
     *
     * @tags 用户账号
     * @name UserControllerXycDataGet
     * @summary 获取分享，售卡，浏览数
     * @request GET:/api/user/xycGetData
     * @secure
     */
    userControllerXycDataGet: (params: RequestParams = {}) =>
      this.request<
        ResultData & {
          data?: XYCUpdateDataDto;
        },
        any
      >({
        path: `/api/user/xycGetData`,
        method: "GET",
        secure: true,
        format: "json",
        ...params,
      }),

    /**
     * No description
     *
     * @tags 文件存储
     * @name OssControllerUploadFile
     * @summary 文件上传,返回 url 地址
     * @request POST:/api/oss/upload
     * @secure
     */
    ossControllerUploadFile: (
      data: {
        /**
         * 文件
         * @format binary
         */
        file?: File;
        /**
         * 上传文件描述，可以是纯字符串，也可以是JSON字符串
         * @format text
         */
        business?: string;
      },
      params: RequestParams = {},
    ) =>
      this.request<
        ResultData & {
          data?: OssEntity;
        },
        any
      >({
        path: `/api/oss/upload`,
        method: "POST",
        body: data,
        secure: true,
        type: ContentType.FormData,
        format: "json",
        ...params,
      }),

    /**
     * No description
     *
     * @tags 文件存储
     * @name OssControllerFindList
     * @summary 查询文件上传列表
     * @request GET:/api/oss/list
     * @secure
     */
    ossControllerFindList: (
      query?: {
        /** 显示页数 */
        page?: number;
        /** 每页显示条数 */
        size?: number;
        /** 搜索条件，起始时间 */
        startDay?: string;
        /** 搜索条件，结束时间 */
        endDay?: string;
      },
      params: RequestParams = {},
    ) =>
      this.request<
        ResultData & {
          data?: {
            list?: OssEntity[];
            /** @default 0 */
            total?: number;
          };
        },
        any
      >({
        path: `/api/oss/list`,
        method: "GET",
        query: query,
        secure: true,
        format: "json",
        ...params,
      }),

    /**
     * @description 列表
     *
     * @tags 商品模块
     * @name ProductControllerFind
     * @summary 查询商品列表
     * @request GET:/api/product/list
     * @secure
     */
    productControllerFind: (
      query?: {
        /** 显示页数 */
        page?: number;
        /** 每页显示条数 */
        size?: number;
        /** 商品id */
        id?: string;
        /** 商品名称 */
        name?: string;
        /** 商品编码 */
        code?: string;
        /** 状态 0-禁用，1-正常使用 */
        status?: 0 | 1;
      },
      params: RequestParams = {},
    ) =>
      this.request<
        ResultData & {
          data?: ProductListResponstDto[];
        },
        any
      >({
        path: `/api/product/list`,
        method: "GET",
        query: query,
        secure: true,
        format: "json",
        ...params,
      }),

    /**
     * No description
     *
     * @tags 商品模块
     * @name ProductControllerFindOne
     * @summary 查询商品详情
     * @request GET:/api/product/{id}
     * @secure
     */
    productControllerFindOne: (id: string, params: RequestParams = {}) =>
      this.request<
        ResultData & {
          data?: ProductDetailResponseDto;
        },
        any
      >({
        path: `/api/product/${id}`,
        method: "GET",
        secure: true,
        format: "json",
        ...params,
      }),

    /**
     * No description
     *
     * @tags 订单模块
     * @name OrderControllerUpdate
     * @summary 订单创建
     * @request POST:/api/order/create
     * @secure
     */
    orderControllerUpdate: (data: OrderEntity, params: RequestParams = {}) =>
      this.request<
        ResultData & {
          /** @default null */
          data?: null;
        },
        any
      >({
        path: `/api/order/create`,
        method: "POST",
        body: data,
        secure: true,
        type: ContentType.Json,
        format: "json",
        ...params,
      }),

    /**
     * No description
     *
     * @tags 订单模块
     * @name OrderControllerFind
     * @summary 查询订单列表
     * @request GET:/api/order/list
     * @secure
     */
    orderControllerFind: (
      query?: {
        /** 显示页数 */
        page?: number;
        /** 每页显示条数 */
        size?: number;
        /** 订单状态 1 等待买家付款 2 等待发货 3 已发货 4 待续费 6 已完成 7 已关闭 8待退款 9退款中 10 已退款 */
        orderStatus?: "1" | "2" | "3" | "4" | "5" | "6" | "9";
      },
      params: RequestParams = {},
    ) =>
      this.request<
        ResultData & {
          data?: {
            list?: OrderEntity[];
            /** @default 0 */
            total?: number;
          };
        },
        any
      >({
        path: `/api/order/list`,
        method: "GET",
        query: query,
        secure: true,
        format: "json",
        ...params,
      }),

    /**
     * No description
     *
     * @tags 订单模块
     * @name OrderControllerFindOne
     * @summary 查询订单详情
     * @request GET:/api/order/detail/{id}
     * @secure
     */
    orderControllerFindOne: (id: string, params: RequestParams = {}) =>
      this.request<
        ResultData & {
          data?: OrderEntity;
        },
        any
      >({
        path: `/api/order/detail/${id}`,
        method: "GET",
        secure: true,
        format: "json",
        ...params,
      }),

    /**
     * No description
     *
     * @tags 订单模块
     * @name OrderControllerDelete
     * @summary 删除订单
     * @request POST:/api/order/delect
     * @secure
     */
    orderControllerDelete: (
      data: {
        /**
         * orderId
         * @format text
         */
        id?: string;
      },
      params: RequestParams = {},
    ) =>
      this.request<
        ResultData & {
          /** @default null */
          data?: null;
        },
        any
      >({
        path: `/api/order/delect`,
        method: "POST",
        body: data,
        secure: true,
        type: ContentType.Json,
        format: "json",
        ...params,
      }),

    /**
     * No description
     *
     * @tags 订单模块
     * @name OrderControllerPay
     * @summary 支付订单
     * @request POST:/api/order/pay
     * @secure
     */
    orderControllerPay: (
      data: {
        /**
         * orderId
         * @format text
         */
        id?: string;
      },
      params: RequestParams = {},
    ) =>
      this.request<
        ResultData & {
          /** @default null */
          data?: null;
        },
        any
      >({
        path: `/api/order/pay`,
        method: "POST",
        body: data,
        secure: true,
        type: ContentType.Json,
        format: "json",
        ...params,
      }),

    /**
     * No description
     *
     * @tags 订单模块
     * @name OrderControllerAlipayNotifyUrl
     * @summary 支付宝异步回调接口
     * @request POST:/api/order/alipayNotifyUrl
     * @secure
     */
    orderControllerAlipayNotifyUrl: (params: RequestParams = {}) =>
      this.request<void, any>({
        path: `/api/order/alipayNotifyUrl`,
        method: "POST",
        secure: true,
        ...params,
      }),

    /**
     * No description
     *
     * @tags 订单模块
     * @name OrderControllerXycUpdate
     * @summary 订单创建
     * @request POST:/api/order/xycCreate
     * @secure
     */
    orderControllerXycUpdate: (data: XYCOrderEntity, params: RequestParams = {}) =>
      this.request<
        ResultData & {
          /** @default null */
          data?: null;
        },
        any
      >({
        path: `/api/order/xycCreate`,
        method: "POST",
        body: data,
        secure: true,
        type: ContentType.Json,
        format: "json",
        ...params,
      }),

    /**
     * No description
     *
     * @tags 订单模块
     * @name OrderControllerXycFind
     * @summary 查询订单列表
     * @request GET:/api/order/xycList
     * @secure
     */
    orderControllerXycFind: (
      query?: {
        /** 显示页数 */
        page?: number;
        /** 每页显示条数 */
        size?: number;
        /** 售卡品牌 */
        brand?: string;
        /** 售卡人 */
        userId?: string;
      },
      params: RequestParams = {},
    ) =>
      this.request<
        ResultData & {
          data?: {
            list?: XYCOrderEntity[];
            /** @default 0 */
            total?: number;
          };
        },
        any
      >({
        path: `/api/order/xycList`,
        method: "GET",
        query: query,
        secure: true,
        format: "json",
        ...params,
      }),

    /**
     * No description
     *
     * @tags 订单模块
     * @name OrderControllerXycDelete
     * @summary 删除订单
     * @request POST:/api/order/xycDelect
     * @secure
     */
    orderControllerXycDelete: (
      data: {
        /**
         * orderId
         * @format text
         */
        id?: string;
      },
      params: RequestParams = {},
    ) =>
      this.request<
        ResultData & {
          /** @default null */
          data?: null;
        },
        any
      >({
        path: `/api/order/xycDelect`,
        method: "POST",
        body: data,
        secure: true,
        type: ContentType.Json,
        format: "json",
        ...params,
      }),

    /**
     * No description
     *
     * @tags 订单模块
     * @name OrderControllerGetFile
     * @summary 导出订单excel
     * @request GET:/api/order/xycDown
     * @secure
     */
    orderControllerGetFile: (
      query?: {
        /** 显示页数 */
        page?: number;
        /** 每页显示条数 */
        size?: number;
        /** 售卡品牌 */
        brand?: string;
        /** 售卡人 */
        userId?: string;
      },
      params: RequestParams = {},
    ) =>
      this.request<void, any>({
        path: `/api/order/xycDown`,
        method: "GET",
        query: query,
        secure: true,
        ...params,
      }),

    /**
     * No description
     *
     * @tags 用户优惠券
     * @name CouponControllerFind
     * @summary 查询列表
     * @request GET:/api/coupon/list
     * @secure
     */
    couponControllerFind: (
      query?: {
        /** 显示页数 */
        page?: number;
        /** 每页显示条数 */
        size?: number;
        /** 用户优惠券id */
        userCouponId?: string;
        /** 是否已使用， 0-否 1-是 */
        used?: string;
      },
      params: RequestParams = {},
    ) =>
      this.request<
        ResultData & {
          data?: {
            list?: UserCouponEntity[];
            /** @default 0 */
            total?: number;
          };
        },
        any
      >({
        path: `/api/coupon/list`,
        method: "GET",
        query: query,
        secure: true,
        format: "json",
        ...params,
      }),

    /**
     * No description
     *
     * @tags 首页模块
     * @name IndexControllerFind
     * @summary 查询首页数据
     * @request GET:/api/index/index
     * @secure
     */
    indexControllerFind: (params: RequestParams = {}) =>
      this.request<
        ResultData & {
          data?: IndexResponseDto;
        },
        any
      >({
        path: `/api/index/index`,
        method: "GET",
        secure: true,
        format: "json",
        ...params,
      }),

    /**
     * No description
     *
     * @tags banner模块
     * @name BannerControllerFind
     * @summary 查询列表
     * @request GET:/api/banner/list
     * @secure
     */
    bannerControllerFind: (params: RequestParams = {}) =>
      this.request<
        ResultData & {
          data?: BannerEntity[];
        },
        any
      >({
        path: `/api/banner/list`,
        method: "GET",
        secure: true,
        format: "json",
        ...params,
      }),

    /**
     * No description
     *
     * @tags 地址模块
     * @name AddressControllerFind
     * @summary 查询地址列表
     * @request GET:/api/address/list
     * @secure
     */
    addressControllerFind: (
      query?: {
        /** id */
        id?: string;
        /** userId */
        userId?: string;
        /** 是否默认地址， 0-否 1-是 */
        isDefault?: 0 | 1;
        /** 收货人 */
        name?: string;
        /** 联系电话 */
        phone?: string;
        /** 备用电话 */
        alternatePhone?: string;
        /** 省 */
        province?: string;
        /** 市 */
        city?: string;
        /** 区 */
        region?: string;
        /** 详细地址 */
        addressDetail?: string;
        /** 楼栋门牌号 */
        addressNo?: string;
        /**
         * 更新时间
         * @format date-time
         */
        updateDate?: string;
        /** 显示页数 */
        page?: number;
        /** 每页显示条数 */
        size?: number;
      },
      params: RequestParams = {},
    ) =>
      this.request<
        ResultData & {
          data?: {
            list?: AddressEntity[];
            /** @default 0 */
            total?: number;
          };
        },
        any
      >({
        path: `/api/address/list`,
        method: "GET",
        query: query,
        secure: true,
        format: "json",
        ...params,
      }),

    /**
     * No description
     *
     * @tags 地址模块
     * @name AddressControllerCreate
     * @summary 创建地址
     * @request POST:/api/address/create
     * @secure
     */
    addressControllerCreate: (data: AddressEntity, params: RequestParams = {}) =>
      this.request<
        ResultData & {
          /** @default null */
          data?: null;
        },
        any
      >({
        path: `/api/address/create`,
        method: "POST",
        body: data,
        secure: true,
        type: ContentType.Json,
        format: "json",
        ...params,
      }),

    /**
     * No description
     *
     * @tags 地址模块
     * @name AddressControllerCreateOrUpdate
     * @summary 修改地址
     * @request POST:/api/address/update
     * @secure
     */
    addressControllerCreateOrUpdate: (data: AddressEntity, params: RequestParams = {}) =>
      this.request<
        ResultData & {
          /** @default null */
          data?: null;
        },
        any
      >({
        path: `/api/address/update`,
        method: "POST",
        body: data,
        secure: true,
        type: ContentType.Json,
        format: "json",
        ...params,
      }),

    /**
     * No description
     *
     * @tags 地址模块
     * @name AddressControllerFindOne
     * @summary 查询地址详情
     * @request GET:/api/address/detail/{id}
     * @secure
     */
    addressControllerFindOne: (id: string, params: RequestParams = {}) =>
      this.request<
        ResultData & {
          data?: AddressEntity;
        },
        any
      >({
        path: `/api/address/detail/${id}`,
        method: "GET",
        secure: true,
        format: "json",
        ...params,
      }),

    /**
     * No description
     *
     * @tags 地址模块
     * @name AddressControllerDelete
     * @summary 删除地址
     * @request GET:/api/address/del/{id}
     * @secure
     */
    addressControllerDelete: (id: string, params: RequestParams = {}) =>
      this.request<
        ResultData & {
          /** @default null */
          data?: null;
        },
        any
      >({
        path: `/api/address/del/${id}`,
        method: "GET",
        secure: true,
        format: "json",
        ...params,
      }),

    /**
     * No description
     *
     * @tags 地址模块
     * @name AddressControllerSetIsDefault
     * @summary 设为默认地址
     * @request GET:/api/address/setIsDefault/{id}
     * @secure
     */
    addressControllerSetIsDefault: (id: string, params: RequestParams = {}) =>
      this.request<
        ResultData & {
          /** @default null */
          data?: null;
        },
        any
      >({
        path: `/api/address/setIsDefault/${id}`,
        method: "GET",
        secure: true,
        format: "json",
        ...params,
      }),

    /**
     * No description
     *
     * @tags 地址模块
     * @name AddressControllerGetProvince
     * @summary 获取省份
     * @request POST:/api/address/getProvince
     * @secure
     */
    addressControllerGetProvince: (data: ProvinceEntity, params: RequestParams = {}) =>
      this.request<
        ResultData & {
          data?: ProvinceEntity[];
        },
        any
      >({
        path: `/api/address/getProvince`,
        method: "POST",
        body: data,
        secure: true,
        type: ContentType.Json,
        format: "json",
        ...params,
      }),

    /**
     * No description
     *
     * @tags 地址模块
     * @name AddressControllerGetCity
     * @summary 获取城市
     * @request POST:/api/address/getCity
     * @secure
     */
    addressControllerGetCity: (data: CityEntity, params: RequestParams = {}) =>
      this.request<
        ResultData & {
          data?: CityEntity[];
        },
        any
      >({
        path: `/api/address/getCity`,
        method: "POST",
        body: data,
        secure: true,
        type: ContentType.Json,
        format: "json",
        ...params,
      }),

    /**
     * No description
     *
     * @tags 地址模块
     * @name AddressControllerGetArea
     * @summary 获取区域
     * @request POST:/api/address/getArea
     * @secure
     */
    addressControllerGetArea: (data: AreaEntity, params: RequestParams = {}) =>
      this.request<
        ResultData & {
          data?: AreaEntity[];
        },
        any
      >({
        path: `/api/address/getArea`,
        method: "POST",
        body: data,
        secure: true,
        type: ContentType.Json,
        format: "json",
        ...params,
      }),

    /**
     * No description
     *
     * @tags intro模块
     * @name IntroControllerFind
     * @summary 查询列表
     * @request POST:/api/intro/list
     * @secure
     */
    introControllerFind: (data: FindIntroListDto, params: RequestParams = {}) =>
      this.request<
        ResultData & {
          data?: {
            list?: IntroEntity[];
            /** @default 0 */
            total?: number;
          };
        },
        any
      >({
        path: `/api/intro/list`,
        method: "POST",
        body: data,
        secure: true,
        type: ContentType.Json,
        format: "json",
        ...params,
      }),
  };
}
